''========================================================
'' Autor: 		Luis Antonio Lara Capetillo
'' Fecha Creación: 	26/9/2012
'' Descripcion: 	Clase Componente ctlGridCargaGeneral
''========================================================

Public Class ctlGridCargaGeneral
	  Public Event btnnidClicked As EventHandler
	  Public Event btnnidClicked As EventHandler
	  Public Event btnnidClicked As EventHandler

#Region "Propiedades"

  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblnid
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblnidTitulo() As String
    Get
      Return Me.lblnid.Text
    End Get
    Set(value As String)
      Me.lblnid.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblnidEmbalaje
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblnidEmbalajeTitulo() As String
    Get
      Return Me.lblnidEmbalaje.Text
    End Get
    Set(value As String)
      Me.lblnidEmbalaje.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblcantidad
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblcantidadTitulo() As String
    Get
      Return Me.lblcantidad.Text
    End Get
    Set(value As String)
      Me.lblcantidad.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lbltoneladas
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lbltoneladasTitulo() As String
    Get
      Return Me.lbltoneladas.Text
    End Get
    Set(value As String)
      Me.lbltoneladas.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblganchos
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblganchosTitulo() As String
    Get
      Return Me.lblganchos.Text
    End Get
    Set(value As String)
      Me.lblganchos.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblnidArea
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblnidAreaTitulo() As String
    Get
      Return Me.lblnidArea.Text
    End Get
    Set(value As String)
      Me.lblnidArea.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblnidProducto
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblnidProductoTitulo() As String
    Get
      Return Me.lblnidProducto.Text
    End Get
    Set(value As String)
      Me.lblnidProducto.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblnidPuerto
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblnidPuertoTitulo() As String
    Get
      Return Me.lblnidPuerto.Text
    End Get
    Set(value As String)
      Me.lblnidPuerto.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblimo
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblimoTitulo() As String
    Get
      Return Me.lblimo.Text
    End Get
    Set(value As String)
      Me.lblimo.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblnidEmpresas
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblnidEmpresasTitulo() As String
    Get
      Return Me.lblnidEmpresas.Text
    End Get
    Set(value As String)
      Me.lblnidEmpresas.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblnidEmpresaMan
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblnidEmpresaManTitulo() As String
    Get
      Return Me.lblnidEmpresaMan.Text
    End Get
    Set(value As String)
      Me.lblnidEmpresaMan.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor nidEmbalaje del TextBox txtnidEmbalaje
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property nidEmbalaje() As String
    Get
      Return Me.txtnidEmbalaje.Text
    End Get
    Set(value As String)
      Me.txtnidEmbalaje.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor cantidad del TextBox txtcantidad
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property cantidad() As String
    Get
      Return Me.txtcantidad.Text
    End Get
    Set(value As String)
      Me.txtcantidad.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor toneladas del TextBox txttoneladas
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property toneladas() As String
    Get
      Return Me.txttoneladas.Text
    End Get
    Set(value As String)
      Me.txttoneladas.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor ganchos del TextBox txtganchos
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property ganchos() As String
    Get
      Return Me.txtganchos.Text
    End Get
    Set(value As String)
      Me.txtganchos.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor nidArea del TextBox txtnidArea
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property nidArea() As String
    Get
      Return Me.txtnidArea.Text
    End Get
    Set(value As String)
      Me.txtnidArea.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor nidProducto del TextBox txtnidProducto
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property nidProducto() As String
    Get
      Return Me.txtnidProducto.Text
    End Get
    Set(value As String)
      Me.txtnidProducto.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor nidPuerto del TextBox txtnidPuerto
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property nidPuerto() As String
    Get
      Return Me.txtnidPuerto.Text
    End Get
    Set(value As String)
      Me.txtnidPuerto.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor imo del TextBox txtimo
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property imo() As String
    Get
      Return Me.txtimo.Text
    End Get
    Set(value As String)
      Me.txtimo.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor nidEmpresas del TextBox txtnidEmpresas
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property nidEmpresas() As String
    Get
      Return Me.txtnidEmpresas.Text
    End Get
    Set(value As String)
      Me.txtnidEmpresas.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor nidEmpresaMan del TextBox txtnidEmpresaMan
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property nidEmpresaMan() As String
    Get
      Return Me.txtnidEmpresaMan.Text
    End Get
    Set(value As String)
      Me.txtnidEmpresaMan.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Habilita o Desabilita el Control para Edicion
  ''' </summary>
  ''' <value>True o False</value>
  ''' <remarks></remarks>
  Public WriteOnly Property Enabled() As Boolean
    Set(value As Boolean)
	  btnnid.Enabled=value
      btnnid.Enabled=value
      btnnid.Enabled=value
      txtnidEmbalaje.Enabled=value
      txtcantidad.Enabled=value
      txttoneladas.Enabled=value
      txtganchos.Enabled=value
      txtnidArea.Enabled=value
      txtnidProducto.Enabled=value
      txtnidPuerto.Enabled=value
      txtimo.Enabled=value
      txtnidEmpresas.Enabled=value
      txtnidEmpresaMan.Enabled=value
      
    End Set
  End Property

  ''' <summary>
  ''' Habilita o Desabilita el Control para solo lectura
  ''' </summary>
  ''' <value>True o False</value>
  ''' <remarks>ReadOnly</remarks>
  Public WriteOnly Property Lectura() As Boolean
    Set(value As Boolean)
	  btnnid.ReadOnly=value
      btnnid.ReadOnly=value
      btnnid.ReadOnly=value
      txtnidEmbalaje.ReadOnly=value
      txtcantidad.ReadOnly=value
      txttoneladas.ReadOnly=value
      txtganchos.ReadOnly=value
      txtnidArea.ReadOnly=value
      txtnidProducto.ReadOnly=value
      txtnidPuerto.ReadOnly=value
      txtimo.ReadOnly=value
      txtnidEmpresas.ReadOnly=value
      txtnidEmpresaMan.ReadOnly=value
      
    End Set
  End Property


#End Region
#Region "Eventos"
  Protected Sub btnnid_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles btnnid.Click
    OnbtnnidClick(sender)
  End Sub

  Protected Sub btnnid_Click(sender As Object, e As System.EventArgs) Handles btnnid.Click
    OnbtnnidClick(sender)
  End Sub

  Protected Sub btnnid_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles btnnid.Click
    OnbtnnidClick(sender)
  End Sub

#End Region
#Region "Metodos"
  Protected Overridable Sub OnbtnnidClick(ByVal sender As Object)
    RaiseEvent btnnidClicked(sender, New EventArgs)
  End Sub

  Protected Overridable Sub OnbtnnidClick(ByVal sender As Object)
    RaiseEvent btnnidClicked(sender, New EventArgs)
  End Sub

  Protected Overridable Sub OnbtnnidClick(ByVal sender As Object)
    RaiseEvent btnnidClicked(sender, New EventArgs)
  End Sub

  ''' <summary>
  ''' Metodo para asignar los datos al componente ctlTurismo
  ''' </summary>
  ''' <param name="tablaDatos">DataTable donde se obtienen los datos</param>
  ''' <remarks></remarks>
  Public Sub AsignarDatos(ByVal tablaDatos As DataTable)
    Me.txtnidEmbalaje.Text= tablaDatos.Rows(0)("nidEmbalaje").ToString
    Me.txtcantidad.Text= tablaDatos.Rows(0)("cantidad").ToString
    Me.txttoneladas.Text= tablaDatos.Rows(0)("toneladas").ToString
    Me.txtganchos.Text= tablaDatos.Rows(0)("ganchos").ToString
    Me.txtnidArea.Text= tablaDatos.Rows(0)("nidArea").ToString
    Me.txtnidProducto.Text= tablaDatos.Rows(0)("nidProducto").ToString
    Me.txtnidPuerto.Text= tablaDatos.Rows(0)("nidPuerto").ToString
    Me.txtimo.Text= tablaDatos.Rows(0)("imo").ToString
    Me.txtnidEmpresas.Text= tablaDatos.Rows(0)("nidEmpresas").ToString
    Me.txtnidEmpresaMan.Text= tablaDatos.Rows(0)("nidEmpresaMan").ToString
    
  End Sub








#End Region
End Class
